Fixed: Error: hardhat_setLedgerOutputEnabled#6404
Fixed: Error: hardhat_setLedgerOutputEnabled#6404godmode2k wants to merge 1 commit intoNomicFoundation:mainfrom
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Hey @godmode2k, thanks for the PR and sorry for the delay in review. |
Errors:
Environment
Geth (a localhost node for a private network)
Geth version: geth-alltools-linux-amd64-1.11.6-ea9e62ca/geth
Hardhat version: Hardhat v2.22.18
Test: Deploy ERC-20 simple token
Error logs
ERROR:
(https://github.com/NomicFoundation/hardhat)
(https://github.com/NomicFoundation/hardhat-ignition)
FIX 1/2:
hardhat:ignition ProviderError: hardhat_setLedgerOutputEnabled - Method not supported
hardhat_setLedgerOutputEnabled is an internal feature of Hardhat and is not intended for other uses.
So, I think if you're running a localhost Geth node for a private network instead of Hardhat's, you'll need to pass that function call.
Fix it as shown below.
Repo: https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat-ignition/src/index.ts: 285, 338
Local: node_modules/@nomicfoundation/hardhat-ignition/dist/src/index.js: 200, 234
FIX 2/2:
ProviderError: missing trie node ... (path )
In Geth, it returns NULL (or nil) if the transaction count (eth.getTransactionCount(..)) is 0, otherwise, it returns an unsigned integer (value > 0).
You can also view the logs in Geth's log output.
In the Geth console, even if the transaction count is 0, you might encounter an exception error instead of 0, as shown below.
Hardhat doesn't handle this exceptions.
Fix it as shown below.
Repo: https://github.com/NomicFoundation/hardhat-ignition/blob/development/packages/core/src/internal/execution/jsonrpc-client.ts: 466
Local: node_modules/@nomicfoundation/ignition-core/dist/src/internal/execution/jsonrpc-client.js: 197
now, it works good for me.